<?php
require 'basehandle.php';
require '../dao/userdao.php';

class Newloghandle implements basehandle{
	public function dohandle(){
		$userid=$_POST['userid'];
		$dao=new userdao();
 		$rs=$dao->newlogin($userid);
		if(!empty($rs)){
			$info=array("rs"=>"success",
				"newvip"=>$rs[0]['vip'],
				"newulevel"=>$rs[0]['ulevel'],
				"newucoin"=>$rs[0]['price']);
			error_log($rs[0]['vip']);
			error_log($rs[0]['ulevel']);
			error_log($rs[0]['price']);
		}
		else{
			$info=array("rs"=>"error","errorinf"=>"登陆失败");
		}
		echo json_encode($info);
	}
	
}  
?>